<template>
  <el-card :body-style="{ padding: '0px' }" class="Introduction" @click.native="link">
    <div style="padding: 14px;">
      <slot></slot>
      <div class="bottom clearfix">
                <div class="item" >书名: {{BookName}}</div>
                <div class="item" >作者: {{Author}}</div>
                <div class="item" >价格: {{Price}}</div>
      </div>
    </div>
  </el-card>
</template>

<script>
export default {
  name: 'BriefIntroduction',
  data () {
    return {
    }
  },
  props: {
    BookName: {
      required: true
    },
    Author: {
      required: true
    },
    Price: {
      required: true
    }
  },
  methods: {
    link () {
      // eslint-disable-next-line standard/object-curly-even-spacing
      this.$store.commit('updateDetailBook', this.BookName)
      // eslint-disable-next-line standard/object-curly-even-spacing
      this.$router.push({ path: '/BookDetail/' + this.BookName})
      // this.$router.push({ path: '/Contests/' + this.BookName })
    },
    // 从后台获取书的信息
    getData () {

    }
  }
}
</script>

<style scoped>
  .Introduction{
    margin-top: 2%;
    margin-left: 2%;
    float: left;
    font-size: 12px;
    width: 180px;
    height: 220px;
  }
  .bottom {
    margin-top: 13px;
    line-height: 12px;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }
  .item
  {
    padding: 3px;
  }
  .clearfix:after {
    clear: both
  }
</style>
